<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE FlexibleInstances #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE RankNTypes #-}</span><span>
</span><span id="line-3"></span><span class="hs-pragma">{-# LANGUAGE PatternGuards #-}</span><span>
</span><span id="line-4"></span><span class="hs-comment">-- | See &lt;https://github.com/ezyang/ghc-proposals/blob/backpack/proposals/0000-backpack.rst&gt;</span><span>
</span><span id="line-5"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Backpack.Id</span><span class="hs-special">(</span><span>
</span><span id="line-6"></span><span>    </span><span class="annot"><a href="Distribution.Backpack.Id.html#computeComponentId"><span class="hs-identifier">computeComponentId</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-7"></span><span>    </span><span class="annot"><a href="Distribution.Backpack.Id.html#computeCompatPackageKey"><span class="hs-identifier">computeCompatPackageKey</span></a></span><span class="hs-special">,</span><span>
</span><span id="line-8"></span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-9"></span><span>
</span><span id="line-10"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-11"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-12"></span><span>
</span><span id="line-13"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.UnqualComponentName.html"><span class="hs-identifier">Distribution.Types.UnqualComponentName</span></a></span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html"><span class="hs-identifier">Distribution.Simple.Compiler</span></a></span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.PackageDescription.html"><span class="hs-identifier">Distribution.PackageDescription</span></a></span><span>
</span><span id="line-16"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.Setup.html"><span class="hs-identifier">Distribution.Simple.Setup</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Setup</span></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="Distribution.Simple.InstallDirs.html"><span class="hs-identifier">Distribution.Simple.InstallDirs</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">InstallDirs</span></span><span>
</span><span id="line-18"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Simple.LocalBuildInfo.html"><span class="hs-identifier">Distribution.Simple.LocalBuildInfo</span></a></span><span>
</span><span id="line-19"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentId.html"><span class="hs-identifier">Distribution.Types.ComponentId</span></a></span><span>
</span><span id="line-20"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.UnitId.html"><span class="hs-identifier">Distribution.Types.UnitId</span></a></span><span>
</span><span id="line-21"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Types.MungedPackageName.html"><span class="hs-identifier">Distribution.Types.MungedPackageName</span></a></span><span>
</span><span id="line-22"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Utils.Base62.html"><span class="hs-identifier">Distribution.Utils.Base62</span></a></span><span>
</span><span id="line-23"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Version.html"><span class="hs-identifier">Distribution.Version</span></a></span><span>
</span><span id="line-24"></span><span>
</span><span id="line-25"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Pretty.html"><span class="hs-identifier">Distribution.Pretty</span></a></span><span>
</span><span id="line-26"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier">prettyShow</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-27"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Parsec.html"><span class="hs-identifier">Distribution.Parsec</span></a></span><span> </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Distribution.Parsec.html#simpleParsec"><span class="hs-identifier">simpleParsec</span></a></span><span> </span><span class="hs-special">)</span><span>
</span><span id="line-28"></span><span>
</span><span id="line-29"></span><span class="hs-comment">-- | This method computes a default, &quot;good enough&quot; 'ComponentId'</span><span>
</span><span id="line-30"></span><span class="hs-comment">-- for a package.  The intent is that cabal-install (or the user) will</span><span>
</span><span id="line-31"></span><span class="hs-comment">-- specify a more detailed IPID via the @--ipid@ flag if necessary.</span><span>
</span><span id="line-32"></span><span class="annot"><a href="Distribution.Backpack.Id.html#computeComponentId"><span class="hs-identifier hs-type">computeComponentId</span></a></span><span>
</span><span id="line-33"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><span class="hs-identifier hs-type">Bool</span></span><span> </span><span class="hs-comment">-- deterministic mode</span><span>
</span><span id="line-34"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-35"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.ComponentId.html#ComponentId"><span class="hs-identifier hs-type">ComponentId</span></a></span><span>
</span><span id="line-36"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageIdentifier"><span class="hs-identifier hs-type">PackageIdentifier</span></a></span><span>
</span><span id="line-37"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentName.html#ComponentName"><span class="hs-identifier hs-type">ComponentName</span></a></span><span>
</span><span id="line-38"></span><span>    </span><span class="hs-comment">-- This is used by cabal-install's legacy codepath</span><span>
</span><span id="line-39"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">[</span><span class="annot"><a href="Distribution.Types.ComponentId.html#ComponentId"><span class="hs-identifier hs-type">ComponentId</span></a></span><span class="hs-special">]</span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Types.Flag.html#FlagAssignment"><span class="hs-identifier hs-type">FlagAssignment</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-40"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.ComponentId.html#ComponentId"><span class="hs-identifier hs-type">ComponentId</span></a></span><span>
</span><span id="line-41"></span><span id="computeComponentId"><span class="annot"><span class="annottext">computeComponentId :: Bool
-&gt; Flag String
-&gt; Flag ComponentId
-&gt; PackageIdentifier
-&gt; ComponentName
-&gt; Maybe ([ComponentId], FlagAssignment)
-&gt; ComponentId
</span><a href="Distribution.Backpack.Id.html#computeComponentId"><span class="hs-identifier hs-var hs-var">computeComponentId</span></a></span></span><span> </span><span id="local-6989586621679715778"><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679715778"><span class="hs-identifier hs-var">deterministic</span></a></span></span><span> </span><span id="local-6989586621679715777"><span class="annot"><span class="annottext">Flag String
</span><a href="#local-6989586621679715777"><span class="hs-identifier hs-var">mb_ipid</span></a></span></span><span> </span><span id="local-6989586621679715776"><span class="annot"><span class="annottext">Flag ComponentId
</span><a href="#local-6989586621679715776"><span class="hs-identifier hs-var">mb_cid</span></a></span></span><span> </span><span id="local-6989586621679715775"><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679715775"><span class="hs-identifier hs-var">pid</span></a></span></span><span> </span><span id="local-6989586621679715774"><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679715774"><span class="hs-identifier hs-var">cname</span></a></span></span><span> </span><span id="local-6989586621679715773"><span class="annot"><span class="annottext">Maybe ([ComponentId], FlagAssignment)
</span><a href="#local-6989586621679715773"><span class="hs-identifier hs-var">mb_details</span></a></span></span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-42"></span><span>    </span><span class="hs-comment">-- show is found to be faster than intercalate and then replacement of</span><span>
</span><span id="line-43"></span><span>    </span><span class="hs-comment">-- special character used in intercalating. We cannot simply hash by</span><span>
</span><span id="line-44"></span><span>    </span><span class="hs-comment">-- doubly concating list, as it just flatten out the nested list, so</span><span>
</span><span id="line-45"></span><span>    </span><span class="hs-comment">-- different sources can produce same hash</span><span>
</span><span id="line-46"></span><span>    </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679715764"><span class="annot"><span class="annottext">hash_suffix :: String
</span><a href="#local-6989586621679715764"><span class="hs-identifier hs-var hs-var">hash_suffix</span></a></span></span><span>
</span><span id="line-47"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span class="hs-special">(</span><span id="local-6989586621679715763"><span class="annot"><span class="annottext">[ComponentId]
</span><a href="#local-6989586621679715763"><span class="hs-identifier hs-var">dep_ipids</span></a></span></span><span class="hs-special">,</span><span> </span><span id="local-6989586621679715762"><span class="annot"><span class="annottext">FlagAssignment
</span><a href="#local-6989586621679715762"><span class="hs-identifier hs-var">flags</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">&lt;-</span><span> </span><span class="annot"><span class="annottext">Maybe ([ComponentId], FlagAssignment)
</span><a href="#local-6989586621679715773"><span class="hs-identifier hs-var">mb_details</span></a></span><span>
</span><span id="line-48"></span><span>            </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="Distribution.Utils.Base62.html#hashToBase62"><span class="hs-identifier hs-var">hashToBase62</span></a></span><span>
</span><span id="line-49"></span><span>                </span><span class="hs-comment">-- For safety, include the package + version here</span><span>
</span><span id="line-50"></span><span>                </span><span class="hs-comment">-- for GHC 7.10, where just the hash is used as</span><span>
</span><span id="line-51"></span><span>                </span><span class="hs-comment">-- the package key</span><span>
</span><span id="line-52"></span><span>                    </span><span class="hs-special">(</span><span>    </span><span class="annot"><span class="annottext">PackageIdentifier -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679715775"><span class="hs-identifier hs-var">pid</span></a></span><span>
</span><span id="line-53"></span><span>                      </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentId] -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">[ComponentId]
</span><a href="#local-6989586621679715763"><span class="hs-identifier hs-var">dep_ipids</span></a></span><span>
</span><span id="line-54"></span><span>                      </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">FlagAssignment -&gt; String
forall a. Show a =&gt; a -&gt; String
</span><a href="../../base/src/GHC.Show.html#show"><span class="hs-identifier hs-var">show</span></a></span><span> </span><span class="annot"><span class="annottext">FlagAssignment
</span><a href="#local-6989586621679715762"><span class="hs-identifier hs-var">flags</span></a></span><span>     </span><span class="hs-special">)</span><span>
</span><span id="line-55"></span><span>            </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-56"></span><span>        </span><span id="local-6989586621679715758"><span class="annot"><span class="annottext">generated_base :: String
</span><a href="#local-6989586621679715758"><span class="hs-identifier hs-var hs-var">generated_base</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageIdentifier -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679715775"><span class="hs-identifier hs-var">pid</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715764"><span class="hs-identifier hs-var">hash_suffix</span></a></span><span>
</span><span id="line-57"></span><span>        </span><span id="local-6989586621679715757"><span class="annot"><span class="annottext">explicit_base :: String -&gt; String
</span><a href="#local-6989586621679715757"><span class="hs-identifier hs-var hs-var">explicit_base</span></a></span></span><span> </span><span id="local-6989586621679715756"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715756"><span class="hs-identifier hs-var">cid0</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PathTemplate -&gt; String
</span><a href="Distribution.Simple.InstallDirs.html#fromPathTemplate"><span class="hs-identifier hs-var">fromPathTemplate</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">PathTemplateEnv -&gt; PathTemplate -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#substPathTemplate"><span class="hs-identifier hs-var">InstallDirs.substPathTemplate</span></a></span><span> </span><span class="annot"><span class="annottext">PathTemplateEnv
</span><a href="#local-6989586621679715753"><span class="hs-identifier hs-var">env</span></a></span><span>
</span><span id="line-58"></span><span>                                                    </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; PathTemplate
</span><a href="Distribution.Simple.InstallDirs.html#toPathTemplate"><span class="hs-identifier hs-var">toPathTemplate</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715756"><span class="hs-identifier hs-var">cid0</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-59"></span><span>            </span><span class="hs-comment">-- Hack to reuse install dirs machinery</span><span>
</span><span id="line-60"></span><span>            </span><span class="hs-comment">-- NB: no real IPID available at this point</span><span>
</span><span id="line-61"></span><span>          </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679715753"><span class="annot"><span class="annottext">env :: PathTemplateEnv
</span><a href="#local-6989586621679715753"><span class="hs-identifier hs-var hs-var">env</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">PackageIdentifier -&gt; UnitId -&gt; PathTemplateEnv
</span><a href="Distribution.Simple.InstallDirs.html#packageTemplateEnv"><span class="hs-identifier hs-var">packageTemplateEnv</span></a></span><span> </span><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679715775"><span class="hs-identifier hs-var">pid</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; UnitId
</span><a href="Distribution.Types.UnitId.html#mkUnitId"><span class="hs-identifier hs-var">mkUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span class="hs-special">)</span><span>
</span><span id="line-62"></span><span>        </span><span id="local-6989586621679715748"><span class="annot"><span class="annottext">actual_base :: String
</span><a href="#local-6989586621679715748"><span class="hs-identifier hs-var hs-var">actual_base</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Flag String
</span><a href="#local-6989586621679715777"><span class="hs-identifier hs-var">mb_ipid</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-63"></span><span>                        </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679715746"><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715746"><span class="hs-identifier hs-var">ipid0</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="#local-6989586621679715757"><span class="hs-identifier hs-var">explicit_base</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715746"><span class="hs-identifier hs-var">ipid0</span></a></span><span>
</span><span id="line-64"></span><span>                        </span><span class="annot"><span class="annottext">Flag String
</span><a href="Distribution.Simple.Flag.html#NoFlag"><span class="hs-identifier hs-var">NoFlag</span></a></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="#local-6989586621679715778"><span class="hs-identifier hs-var">deterministic</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">PackageIdentifier -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679715775"><span class="hs-identifier hs-var">pid</span></a></span><span>
</span><span id="line-65"></span><span>                               </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span>     </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715758"><span class="hs-identifier hs-var">generated_base</span></a></span><span>
</span><span id="line-66"></span><span>    </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">Flag ComponentId
</span><a href="#local-6989586621679715776"><span class="hs-identifier hs-var">mb_cid</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-67"></span><span>          </span><span class="annot"><a href="Distribution.Simple.Flag.html#Flag"><span class="hs-identifier hs-type">Flag</span></a></span><span> </span><span id="local-6989586621679715744"><span class="annot"><span class="annottext">ComponentId
</span><a href="#local-6989586621679715744"><span class="hs-identifier hs-var">cid</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">ComponentId
</span><a href="#local-6989586621679715744"><span class="hs-identifier hs-var">cid</span></a></span><span>
</span><span id="line-68"></span><span>          </span><span class="annot"><span class="annottext">Flag ComponentId
</span><a href="Distribution.Simple.Flag.html#NoFlag"><span class="hs-identifier hs-var">NoFlag</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; ComponentId
</span><a href="Distribution.Types.ComponentId.html#mkComponentId"><span class="hs-identifier hs-var">mkComponentId</span></a></span><span> </span><span class="annot"><span class="annottext">(String -&gt; ComponentId) -&gt; String -&gt; ComponentId
forall a b. (a -&gt; b) -&gt; a -&gt; b
</span><a href="../../base/src/GHC.Base.html#%24"><span class="hs-operator hs-var">$</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715748"><span class="hs-identifier hs-var">actual_base</span></a></span><span>
</span><span id="line-69"></span><span>                        </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">ComponentName -&gt; Maybe UnqualComponentName
</span><a href="Distribution.Types.ComponentName.html#componentNameString"><span class="hs-identifier hs-var">componentNameString</span></a></span><span> </span><span class="annot"><span class="annottext">ComponentName
</span><a href="#local-6989586621679715774"><span class="hs-identifier hs-var">cname</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-70"></span><span>                                </span><span class="annot"><span class="annottext">Maybe UnqualComponentName
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;&quot;</span></span><span>
</span><span id="line-71"></span><span>                                </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679715741"><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679715741"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName -&gt; String
</span><a href="Distribution.Types.UnqualComponentName.html#unUnqualComponentName"><span class="hs-identifier hs-var">unUnqualComponentName</span></a></span><span> </span><span class="annot"><span class="annottext">UnqualComponentName
</span><a href="#local-6989586621679715741"><span class="hs-identifier hs-var">s</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-72"></span><span>
</span><span id="line-73"></span><span class="hs-comment">-- | In GHC 8.0, the string we pass to GHC to use for symbol</span><span>
</span><span id="line-74"></span><span class="hs-comment">-- names for a package can be an arbitrary, IPID-compatible string.</span><span>
</span><span id="line-75"></span><span class="hs-comment">-- However, prior to GHC 8.0 there are some restrictions on what</span><span>
</span><span id="line-76"></span><span class="hs-comment">-- format this string can be (due to how ghc-pkg parsed the key):</span><span>
</span><span id="line-77"></span><span class="hs-comment">--</span><span>
</span><span id="line-78"></span><span class="hs-comment">--      1. In GHC 7.10, the string had either be of the form</span><span>
</span><span id="line-79"></span><span class="hs-comment">--      foo_ABCD, where foo is a non-semantic alphanumeric/hyphenated</span><span>
</span><span id="line-80"></span><span class="hs-comment">--      prefix and ABCD is two base-64 encoded 64-bit integers,</span><span>
</span><span id="line-81"></span><span class="hs-comment">--      or a GHC 7.8 style identifier.</span><span>
</span><span id="line-82"></span><span class="hs-comment">--</span><span>
</span><span id="line-83"></span><span class="hs-comment">--      2. In GHC 7.8, the string had to be a valid package identifier</span><span>
</span><span id="line-84"></span><span class="hs-comment">--      like foo-0.1.</span><span>
</span><span id="line-85"></span><span class="hs-comment">--</span><span>
</span><span id="line-86"></span><span class="hs-comment">-- So, the problem is that Cabal, in general, has a general IPID,</span><span>
</span><span id="line-87"></span><span class="hs-comment">-- but needs to figure out a package key / package ID that the</span><span>
</span><span id="line-88"></span><span class="hs-comment">-- old ghc-pkg will actually accept.  But there's an EVERY WORSE</span><span>
</span><span id="line-89"></span><span class="hs-comment">-- problem: if ghc-pkg decides to parse an identifier foo-0.1-xxx</span><span>
</span><span id="line-90"></span><span class="hs-comment">-- as if it were a package identifier, which means it will SILENTLY</span><span>
</span><span id="line-91"></span><span class="hs-comment">-- DROP the &quot;xxx&quot; (because it's a tag, and Cabal does not allow tags.)</span><span>
</span><span id="line-92"></span><span class="hs-comment">-- So we must CONNIVE to ensure that we don't pick something that</span><span>
</span><span id="line-93"></span><span class="hs-comment">-- looks like this.</span><span>
</span><span id="line-94"></span><span class="hs-comment">--</span><span>
</span><span id="line-95"></span><span class="hs-comment">-- So this function attempts to define a mapping into the old formats.</span><span>
</span><span id="line-96"></span><span class="hs-comment">--</span><span>
</span><span id="line-97"></span><span class="hs-comment">-- The mapping for GHC 7.8 and before:</span><span>
</span><span id="line-98"></span><span class="hs-comment">--</span><span>
</span><span id="line-99"></span><span class="hs-comment">--      * We use the *compatibility* package name and version.  For</span><span>
</span><span id="line-100"></span><span class="hs-comment">--        public libraries this is just the package identifier; for</span><span>
</span><span id="line-101"></span><span class="hs-comment">--        internal libraries, it's something like &quot;z-pkgname-z-libname-0.1&quot;.</span><span>
</span><span id="line-102"></span><span class="hs-comment">--        See 'computeCompatPackageName' for more details.</span><span>
</span><span id="line-103"></span><span class="hs-comment">--</span><span>
</span><span id="line-104"></span><span class="hs-comment">-- The mapping for GHC 7.10:</span><span>
</span><span id="line-105"></span><span class="hs-comment">--</span><span>
</span><span id="line-106"></span><span class="hs-comment">--      * For CLibName:</span><span>
</span><span id="line-107"></span><span class="hs-comment">--          If the IPID is of the form foo-0.1-ABCDEF where foo_ABCDEF would</span><span>
</span><span id="line-108"></span><span class="hs-comment">--          validly parse as a package key, we pass &quot;ABCDEF&quot;.  (NB: not</span><span>
</span><span id="line-109"></span><span class="hs-comment">--          all hashes parse this way, because GHC 7.10 mandated that</span><span>
</span><span id="line-110"></span><span class="hs-comment">--          these hashes be two base-62 encoded 64 bit integers),</span><span>
</span><span id="line-111"></span><span class="hs-comment">--          but hashes that Cabal generated using 'computeComponentId'</span><span>
</span><span id="line-112"></span><span class="hs-comment">--          are guaranteed to have this form.</span><span>
</span><span id="line-113"></span><span class="hs-comment">--</span><span>
</span><span id="line-114"></span><span class="hs-comment">--          If it is not of this form, we rehash the IPID into the</span><span>
</span><span id="line-115"></span><span class="hs-comment">--          correct form and pass that.</span><span>
</span><span id="line-116"></span><span class="hs-comment">--</span><span>
</span><span id="line-117"></span><span class="hs-comment">--      * For sub-components, we rehash the IPID into the correct format</span><span>
</span><span id="line-118"></span><span class="hs-comment">--        and pass that.</span><span>
</span><span id="line-119"></span><span class="hs-comment">--</span><span>
</span><span id="line-120"></span><span class="annot"><a href="Distribution.Backpack.Id.html#computeCompatPackageKey"><span class="hs-identifier hs-type">computeCompatPackageKey</span></a></span><span>
</span><span id="line-121"></span><span>    </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="Distribution.Simple.Compiler.html#Compiler"><span class="hs-identifier hs-type">Compiler</span></a></span><span>
</span><span id="line-122"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.MungedPackageName.html#MungedPackageName"><span class="hs-identifier hs-type">MungedPackageName</span></a></span><span>
</span><span id="line-123"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.Version.html#Version"><span class="hs-identifier hs-type">Version</span></a></span><span>
</span><span id="line-124"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Types.UnitId.html#UnitId"><span class="hs-identifier hs-type">UnitId</span></a></span><span>
</span><span id="line-125"></span><span>    </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#String"><span class="hs-identifier hs-type">String</span></a></span><span>
</span><span id="line-126"></span><span id="computeCompatPackageKey"><span class="annot"><span class="annottext">computeCompatPackageKey :: Compiler -&gt; MungedPackageName -&gt; Version -&gt; UnitId -&gt; String
</span><a href="Distribution.Backpack.Id.html#computeCompatPackageKey"><span class="hs-identifier hs-var hs-var">computeCompatPackageKey</span></a></span></span><span> </span><span id="local-6989586621679715739"><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679715739"><span class="hs-identifier hs-var">comp</span></a></span></span><span> </span><span id="local-6989586621679715738"><span class="annot"><span class="annottext">MungedPackageName
</span><a href="#local-6989586621679715738"><span class="hs-identifier hs-var">pkg_name</span></a></span></span><span> </span><span id="local-6989586621679715737"><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679715737"><span class="hs-identifier hs-var">pkg_version</span></a></span></span><span> </span><span id="local-6989586621679715736"><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679715736"><span class="hs-identifier hs-var">uid</span></a></span></span><span>
</span><span id="line-127"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#packageKeySupported"><span class="hs-identifier hs-var">packageKeySupported</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679715739"><span class="hs-identifier hs-var">comp</span></a></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">||</span></span><span> </span><span class="annot"><span class="annottext">Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#unitIdSupported"><span class="hs-identifier hs-var">unitIdSupported</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679715739"><span class="hs-identifier hs-var">comp</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-128"></span><span>    </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">MungedPackageName -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">MungedPackageName
</span><a href="#local-6989586621679715738"><span class="hs-identifier hs-var">pkg_name</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><span class="hs-string">&quot;-&quot;</span></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; String
forall a. [a] -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.Base.html#%2B%2B"><span class="hs-operator hs-var">++</span></a></span><span> </span><span class="annot"><span class="annottext">Version -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">Version
</span><a href="#local-6989586621679715737"><span class="hs-identifier hs-var">pkg_version</span></a></span><span>
</span><span id="line-129"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool
</span><span class="hs-identifier hs-var">not</span></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Compiler -&gt; Bool
</span><a href="Distribution.Simple.Compiler.html#unifiedIPIDRequired"><span class="hs-identifier hs-var">unifiedIPIDRequired</span></a></span><span> </span><span class="annot"><span class="annottext">Compiler
</span><a href="#local-6989586621679715739"><span class="hs-identifier hs-var">comp</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span>
</span><span id="line-130"></span><span>        </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679715730"><span class="annot"><span class="annottext">str :: String
</span><a href="#local-6989586621679715730"><span class="hs-identifier hs-var hs-var">str</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnitId -&gt; String
</span><a href="Distribution.Types.UnitId.html#unUnitId"><span class="hs-identifier hs-var">unUnitId</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679715736"><span class="hs-identifier hs-var">uid</span></a></span><span> </span><span class="hs-comment">-- assume no Backpack support</span><span>
</span><span id="line-131"></span><span>            </span><span id="local-6989586621679715721"><span class="annot"><span class="annottext">mb_verbatim_key :: Maybe String
</span><a href="#local-6989586621679715721"><span class="hs-identifier hs-var hs-var">mb_verbatim_key</span></a></span></span><span>
</span><span id="line-132"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">case</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe PackageIdentifier
forall a. Parsec a =&gt; String -&gt; Maybe a
</span><a href="Distribution.Parsec.html#simpleParsec"><span class="hs-identifier hs-var">simpleParsec</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715730"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Maybe"><span class="hs-identifier hs-type">Maybe</span></a></span><span> </span><span class="annot"><a href="Distribution.Types.PackageId.html#PackageId"><span class="hs-identifier hs-type">PackageId</span></a></span><span> </span><span class="hs-keyword">of</span><span>
</span><span id="line-133"></span><span>                    </span><span class="hs-comment">-- Something like 'foo-0.1', use it verbatim.</span><span>
</span><span id="line-134"></span><span>                    </span><span class="hs-comment">-- (NB: hash tags look like tags, so they are parsed,</span><span>
</span><span id="line-135"></span><span>                    </span><span class="hs-comment">-- so the extra equality check tests if a tag was dropped.)</span><span>
</span><span id="line-136"></span><span>                    </span><span class="annot"><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-type">Just</span></a></span><span> </span><span id="local-6989586621679715719"><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679715719"><span class="hs-identifier hs-var">pid0</span></a></span></span><span> </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">PackageIdentifier -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">PackageIdentifier
</span><a href="#local-6989586621679715719"><span class="hs-identifier hs-var">pid0</span></a></span><span> </span><span class="annot"><span class="annottext">String -&gt; String -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715730"><span class="hs-identifier hs-var">str</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715730"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-137"></span><span>                    </span><span class="annot"><span class="annottext">Maybe PackageIdentifier
</span><span class="hs-identifier">_</span></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-138"></span><span>            </span><span id="local-6989586621679715711"><span class="annot"><span class="annottext">mb_truncated_key :: Maybe String
</span><a href="#local-6989586621679715711"><span class="hs-identifier hs-var hs-var">mb_truncated_key</span></a></span></span><span>
</span><span id="line-139"></span><span>                </span><span class="hs-glyph">=</span><span> </span><span class="hs-keyword">let</span><span> </span><span id="local-6989586621679715710"><span class="annot"><span class="annottext">cand :: String
</span><a href="#local-6989586621679715710"><span class="hs-identifier hs-var hs-var">cand</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; String
forall a. (a -&gt; Bool) -&gt; [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#takeWhile"><span class="hs-identifier hs-var">takeWhile</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isAlphaNum"><span class="hs-identifier hs-var">isAlphaNum</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">String -&gt; String
forall a. [a] -&gt; [a]
</span><a href="../../base/src/GHC.List.html#reverse"><span class="hs-identifier hs-var">reverse</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715730"><span class="hs-identifier hs-var">str</span></a></span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-140"></span><span>                  </span><span class="hs-keyword">in</span><span> </span><span class="hs-keyword">if</span><span> </span><span class="annot"><span class="annottext">String -&gt; Int
forall (t :: * -&gt; *) a. Foldable t =&gt; t a -&gt; Int
</span><a href="../../base/src/Data.Foldable.html#length"><span class="hs-identifier hs-var">length</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715710"><span class="hs-identifier hs-var">cand</span></a></span><span> </span><span class="annot"><span class="annottext">Int -&gt; Int -&gt; Bool
forall a. Eq a =&gt; a -&gt; a -&gt; Bool
</span><span class="hs-operator hs-var">==</span></span><span> </span><span class="annot"><span class="annottext">Int
</span><span class="hs-number">22</span></span><span> </span><span class="annot"><span class="annottext">Bool -&gt; Bool -&gt; Bool
</span><span class="hs-operator hs-var">&amp;&amp;</span></span><span> </span><span class="annot"><span class="annottext">(Char -&gt; Bool) -&gt; String -&gt; Bool
forall (t :: * -&gt; *) a. Foldable t =&gt; (a -&gt; Bool) -&gt; t a -&gt; Bool
</span><a href="../../base/src/Data.Foldable.html#all"><span class="hs-identifier hs-var">all</span></a></span><span> </span><span class="annot"><span class="annottext">Char -&gt; Bool
</span><a href="../../base/src/GHC.Unicode.html#isAlphaNum"><span class="hs-identifier hs-var">isAlphaNum</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715710"><span class="hs-identifier hs-var">cand</span></a></span><span>
</span><span id="line-141"></span><span>                        </span><span class="hs-keyword">then</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String
forall a. a -&gt; Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Just"><span class="hs-identifier hs-var">Just</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715710"><span class="hs-identifier hs-var">cand</span></a></span><span>
</span><span id="line-142"></span><span>                        </span><span class="hs-keyword">else</span><span> </span><span class="annot"><span class="annottext">Maybe String
forall a. Maybe a
</span><a href="../../base/src/GHC.Maybe.html#Nothing"><span class="hs-identifier hs-var">Nothing</span></a></span><span>
</span><span id="line-143"></span><span>            </span><span id="local-6989586621679715703"><span class="annot"><span class="annottext">rehashed_key :: String
</span><a href="#local-6989586621679715703"><span class="hs-identifier hs-var hs-var">rehashed_key</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">String -&gt; String
</span><a href="Distribution.Utils.Base62.html#hashToBase62"><span class="hs-identifier hs-var">hashToBase62</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715730"><span class="hs-identifier hs-var">str</span></a></span><span>
</span><span id="line-144"></span><span>        </span><span class="hs-keyword">in</span><span> </span><span class="annot"><span class="annottext">String -&gt; Maybe String -&gt; String
forall a. a -&gt; Maybe a -&gt; a
</span><a href="../../base/src/Data.Maybe.html#fromMaybe"><span class="hs-identifier hs-var">fromMaybe</span></a></span><span> </span><span class="annot"><span class="annottext">String
</span><a href="#local-6989586621679715703"><span class="hs-identifier hs-var">rehashed_key</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679715721"><span class="hs-identifier hs-var">mb_verbatim_key</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String -&gt; Maybe String -&gt; Maybe String
forall (m :: * -&gt; *) a. MonadPlus m =&gt; m a -&gt; m a -&gt; m a
</span><a href="../../base/src/GHC.Base.html#mplus"><span class="hs-operator hs-var">`mplus`</span></a></span><span> </span><span class="annot"><span class="annottext">Maybe String
</span><a href="#local-6989586621679715711"><span class="hs-identifier hs-var">mb_truncated_key</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-145"></span><span>    </span><span class="hs-glyph">|</span><span> </span><span class="annot"><span class="annottext">Bool
</span><a href="../../base/src/GHC.Base.html#otherwise"><span class="hs-identifier hs-var">otherwise</span></a></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">UnitId -&gt; String
forall a. Pretty a =&gt; a -&gt; String
</span><a href="Distribution.Pretty.html#prettyShow"><span class="hs-identifier hs-var">prettyShow</span></a></span><span> </span><span class="annot"><span class="annottext">UnitId
</span><a href="#local-6989586621679715736"><span class="hs-identifier hs-var">uid</span></a></span><span>
</span><span id="line-146"></span></pre></body></html>